package com.kongwg.exer2;



public class Cricle extends GeometricObject {
	private double radius;

	public Cricle() {
		super();
		this.color = "white";
//		this.radius = 1.0;
//		this.weight = 1.0;
	}

	public Cricle(double radius) {
		super();
//		this.color = "white";
		this.radius = radius;
//		this.weight = 1.0;
	}

	public Cricle(double radius,String color,double weight) {
		super(color,weight);
		this.radius = radius;
		
	}

	public double getRadius() {
		return radius;
	}

	public void setRadius(double radius) {
		this.radius = radius;
	}
	
	public double findArea(){
		return Math.PI * radius *radius;
	}

	

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null){
			return false;}
		if (obj instanceof Cricle){
			Cricle cricle = (Cricle) obj;
			
			return this.radius == cricle.radius;
			}
		return false;	
	}
	

	@Override
	public String toString() {
		return "Cricle [radius=" + radius + "]";
	}
	
	
	
	
	
	
	
}
